package com.bw.service.impl;

import com.bw.entity.Book;
import com.bw.entity.Car;
import com.bw.service.BookService;
import com.bw.service.CarService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class CarServiceImpl implements CarService {

    @Override
    public Integer addCar(Car car) {

        System.out.println("addCar 入参是：" + car);
        System.out.println("----CarServiceImpl ----正在执行addCar---- ");
        System.out.println("addCar 返参是：" + 1);
        return 1;
    }

    @Override
    public Integer updateCar(Car car) {
        System.out.println("----CarServiceImpl ----正在执行updateCar---- ");
        return 1;
    }

    @Override
    public List<Car> selectCar(Car car) {
        System.out.println("----CarServiceImpl ----正在执行selectCar---- ");

        List<Car> list = Arrays.asList(Car.builder().id(1).name("bmw").build(), Car.builder().id(2).name("vw").build());
        return list;
    }
}
